//
//@File    :	9.5_external.cpp
//@Time    :	2021/08/22 16:55:20
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	external varibles
//

#include <iostream>

using namespace std;
double warming = 0.3;
//两种变量声明:
//1.定义(definition):给变量分配存储空间
//2.声明(declaration):不给变量分配存储空间
//每个使用外部变量的文件中,都必须声明它,变量只能定义一次
void update(double dt);
void local();
int main()
{
    cout<<"Global warming is "<<warming<<" degrees.\n";
    update(0.1);
    cout<<"Global warming is "<<warming<<" degrees.\n";
    local();
    cout<<"Global warming is "<<warming<<" degrees.\n";
    system("pause");
    return 0;
}